package com.hua.yuan.live.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.FragmentStatePagerAdapter;

import com.hua.yuan.BaseFragment;

import java.util.List;

public class LivePagerAdapter extends FragmentStatePagerAdapter {

    List<BaseFragment> mfragmentList;

    public LivePagerAdapter(FragmentManager fm, List<BaseFragment> fragmentList) {
        super(fm);
        this.mfragmentList = fragmentList;
    }

    @Override
    public Fragment getItem(int position) {
        return mfragmentList.get(position);
    }

    @Override
    public int getCount() {
        return mfragmentList.size();
    }
}
